package com.hjm.project.bankInfo.bankInfo.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hjm.project.bankInfo.bankInfo.mapper.QbBankInfoMapper;
import com.hjm.project.bankInfo.bankInfo.domain.QbBankInfo;
import com.hjm.project.bankInfo.bankInfo.service.IQbBankInfoService;
import com.hjm.common.utils.text.Convert;

/**
 * 钱宝银行卡信息Service业务层处理
 * 
 * @author LOVE
 * @date 2020-11-19
 */
@Service
public class QbBankInfoServiceImpl implements IQbBankInfoService 
{
    @Autowired
    private QbBankInfoMapper qbBankInfoMapper;

    /**
     * 查询钱宝银行卡信息
     * 
     * @param bankName 钱宝银行卡信息ID
     * @return 钱宝银行卡信息
     */
    @Override
    public QbBankInfo selectQbBankInfoById(String bankName)
    {
        return qbBankInfoMapper.selectQbBankInfoById(bankName);
    }

    /**
     * 查询钱宝银行卡信息列表
     * 
     * @param qbBankInfo 钱宝银行卡信息
     * @return 钱宝银行卡信息
     */
    @Override
    public List<QbBankInfo> selectQbBankInfoList(QbBankInfo qbBankInfo)
    {
        return qbBankInfoMapper.selectQbBankInfoList(qbBankInfo);
    }

    /**
     * 新增钱宝银行卡信息
     * 
     * @param qbBankInfo 钱宝银行卡信息
     * @return 结果
     */
    @Override
    public int insertQbBankInfo(QbBankInfo qbBankInfo)
    {
        return qbBankInfoMapper.insertQbBankInfo(qbBankInfo);
    }

    /**
     * 修改钱宝银行卡信息
     * 
     * @param qbBankInfo 钱宝银行卡信息
     * @return 结果
     */
    @Override
    public int updateQbBankInfo(QbBankInfo qbBankInfo)
    {
        return qbBankInfoMapper.updateQbBankInfo(qbBankInfo);
    }

    @Override
    public List<Map> findHeadBank(Map map){

        return qbBankInfoMapper.findHeadBank(map);
    }

    /**
     * 删除钱宝银行卡信息对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteQbBankInfoByIds(String ids)
    {
        return qbBankInfoMapper.deleteQbBankInfoByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除钱宝银行卡信息信息
     * 
     * @param bankName 钱宝银行卡信息ID
     * @return 结果
     */
    @Override
    public int deleteQbBankInfoById(String bankName)
    {
        return qbBankInfoMapper.deleteQbBankInfoById(bankName);
    }
    @Override
    public List<Map<String,Object>> findQBBranchBank(Map bankName)
    {
        return qbBankInfoMapper.findQBBranchBank(bankName);
    }

    @Override
    public List<QbBankInfo> selectHeadList(QbBankInfo qbBankInfo) {
        return qbBankInfoMapper.selectHeadList(qbBankInfo);
    }

}
